package communication
{

	public final class ProtoFactory
	{
		private static var loginProto:LGProto;
		private static var hallProto:HSProto;
		private static var majiangProto:MSProto;

		public static function getLoginProto():LGProto
		{
			if (loginProto == null)
			{
				loginProto=new LGProto();
				loginProto.Init();
			}
			return loginProto;
		}

		public static function getHallProto():HSProto
		{
			if (hallProto == null)
			{
				hallProto=new HSProto();
				hallProto.Init();
			}
			return hallProto;
		}

		public static function getMSProto():MSProto
		{
			if (majiangProto == null)
			{
				majiangProto=new MSProto();
				majiangProto.Init();
			}
			return majiangProto;
		}
	}
}
